Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding support for WebSocket #714

Draft
wants to merge 36 commits into
base: develop-4.0
Choose a base branch
from

Conversation

JeneaVranceanu
Copy link
Collaborator

@JeneaVranceanu JeneaVranceanu commented Dec 20, 2022

WARNING: It's a WIP. If you wish to you can review the PR but it's not finished yet.

Summary of Changes

Adds support for WebSockets that will be part of 4.0 release.

DefaultWeb3SocketClient was added and is based on the native URLSessionWebSocketTask. It's wrapped in #if !os(Linux) ... #endif so we can add a separate instance of DefaultWeb3SocketClient for Linux based on some other library that supports Linux.

Issues that are left to resolve/add:

Test Data or Screenshots

empty

By submitting this pull request, you are confirming the following:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the develop branch.
  • I have included test data or screenshots that prove my fix is effective or that my feature works.
  • I have checked that all tests work and swiftlint is not throwing any errors/warnings.

@JeneaVranceanu JeneaVranceanu added enhancement New feature or request 4.0 labels Dec 20, 2022
@JeneaVranceanu JeneaVranceanu self-assigned this Dec 20, 2022
@JeneaVranceanu JeneaVranceanu changed the base branch from develop to develop-4.0 December 20, 2022 09:33
@yaroslavyaroslav
Copy link
Collaborator

yaroslavyaroslav commented Jan 9, 2023

It could be missed in the rush, so I just refresh it: why do we consider adding websocket as 4.0 feature rather then minor update for the 3.* one @JeneaVranceanu?

@JeneaVranceanu
Copy link
Collaborator Author

It could be missed in the rush, so I just refresh it: why do we consider adding websocket as 4.0 feature rather then minor update for the 3.* one @JeneaVranceanu?

@yaroslavyaroslav I think we will have to change the way we store and manage AbstractKeystore in the provider and or Web3 class. It's not yet completely decided. I'm going to focus on that in the following days as I'm back from holidays starting this week.

@yaroslavyaroslav
Copy link
Collaborator

@JeneaVranceanu I'm really curious why the WebSocket will lead to changes that you've mentioned. Looking forward to hear from you, no rushing tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants